﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using log4net;

/// <summary>
/// Summary description for LogManager
/// </summary>
public class PALogManager
{
	#region LOG4NET
	private static readonly ILog log = LogManager.GetLogger(typeof(PALogManager));
	#endregion


	public static void InfoLog(string message)
	{
		log.Info(message);
	}

	public static void ErrorLog(string Error)
	{
		log.Error(Error);
	}

	#region ExceptionLog

	public static void ExceptionLog(Exception ex)
	{
		log.Fatal(ex.Message, ex);
	}

	public static void ExceptionLog(String message)
	{
		log.Warn(message);
	}

	public static void ExceptionLog(String message, Exception ex)
	{
		log.Warn(message, ex);
	}

	public static void MessageLog(string message)
	{
		if (!String.IsNullOrEmpty(message))
		{
			PALogManager.InfoLog(message);
		}
	}

	#endregion

}
